package com.du.quant.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("trading_advice")
public class TradingAdvice {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("stock_code")
    private String stockCode;

    @TableField("advice_type")
    private String adviceType;

    private BigDecimal confidence;

    private String reasoning;

    @TableField("target_price")
    private BigDecimal targetPrice;

    @TableField("stop_loss")
    private BigDecimal stopLoss;

    @TableField("analysis_data")
    private String analysisData;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    public enum AdviceType {
        BUY("加仓"), SELL("减仓"), HOLD("持有"), EXIT("空仓");

        private final String description;

        AdviceType(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    }
}